package com.ny.demo;

public class B {
    public static void main(String[] args) {
        Dog dog =new Dog();
        dog.setName("大黑");
        dog.setAge(5);
        dog.play();
        System.out.println(dog.getName());
        System.out.println(dog.getAge());
        System.out.println("a 的值是："+dog.a);
        dog.test();

        Cat cat =new Cat();
        cat.setName("小白");
        cat.setAge(1);
        System.out.println(cat.getName());
        System.out.println(cat.getAge());
        cat.play();
    }
}
